﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SW.Commons
{
    /// <summary>
    /// 汉字转拼音帮助类
    /// </summary>
   public  class PinyinHelper
    {
        
        /// <summary>
        /// 获取字符串各个字符的全拼
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        public static string GetQuanpin(string str)
        {
            
            return StringExtension.ToPinYin(str);
        }
        /// <summary>
        /// 获取字符串中各个字符首字母
        /// </summary>
        /// <param name="str">字符串</param>
        /// <returns></returns>
        public static string GetFirstLetter(string str)
        {
            return StringExtension.ToPinYinAbbr(str);
        }
    }
}
